package com.two.screen.water.balance.utils

import com.two.screen.water.balance.net.api.DataApi

/**
 * 创建者     Noel
 * 创建时间   2018/1/8 9:51
 * 描述	      url请求地址。
 */
object Urls {
    val NOT_SIGN_UPDATE_TYPE_BY_ANDROID_CODE_INSTALL = 0//执行 安卓代码 静默安装; 金格力安卓5、鼎橙智能安卓6、
    val NOT_SIGN_UPDATE_TYPE_BY_SHELL_INSTALL = 1//执行 shell指令安装
    val NOT_SIGN_UPDATE_TYPE_BY_MOBILE_INSTALL = 2//手机模式自己安装
    val SIGN_UPDATE_TYPE_BY_SHELL_INSTALL_JGL = 3//签名、执行shell指令安装，通过守护进程启动； 金格力安卓6

    var updateType = NOT_SIGN_UPDATE_TYPE_BY_ANDROID_CODE_INSTALL

    var updateFrom = 4//1代表是本地局域网

    val apkCheckUpdateUrl: String
        get() {
            return when (updateFrom) {
                1 -> "http://192.168.1.1:8080/Balance16inch.json"
                //水产秤
                else -> "http://update.rdxsaj.com/v1/index?type=46"
            }
        }


    //var mBaseUrl = "http://jyglscale.jzxnm.com"

    var mBaseDomain = "192.168.1.151:8080"
    var mBaseUrl = "http://${mBaseDomain}"
    var mBaseSocket = "ws://${mBaseDomain}"

    var leOrMeLogin = "${mBaseUrl}/auth/leOrMeLogin"
    var selectBuyerByPhone = "${mBaseUrl}/merchant/merchantBuyer/selectBuyerByPphone"
    var getProduct = "${mBaseUrl}/system/product/search"
    var getProductBatch = "${mBaseUrl}/merchant/productBatch/selectListByIds/"
    var putProductOrder = "${mBaseUrl}/system/productOrder"
    var getOrderList01 = "${mBaseUrl}/system/productOrder/statList"
    var getOrderList02 = "${mBaseUrl}/system/productTempOrder/list"
    var getDeviceInfo = "${mBaseUrl}/service/deviceInfo/getInfoByCode"
    var putProductHang = "${mBaseUrl}/system/productTempOrder"
    var delProductHang = "${mBaseUrl}/system/productTempOrder/"
    var getOrderDetails01 = "${mBaseUrl}/system/productOrder/"
    var getOrderDetails02 = "${mBaseUrl}/system/productTempOrder/"
    var connectSocket = "${mBaseSocket}/service/ws/device/"
    var putWeightLog = "${mBaseUrl}/system/weighLog"


    /* ======================== 以下是旧版24  =======================   */

    var login = "${mBaseUrl}/pc/login"
    var info = "${mBaseUrl}/pc/info"
    var goodsList = "${mBaseUrl}/pc/goodsList"
    var pay = "${mBaseUrl}/pc/pay"
    var orderQuery = "${mBaseUrl}/pc/orderQuery"
    var memberCard = "${mBaseUrl}/pc/memberCard"
    var batchAddOrder = "${mBaseUrl}/pc/batchAddOrder"
    var goodsUpPrice = "${mBaseUrl}/pc/goodsUpPrice"
    var goodsSort = "${mBaseUrl}/pc/goodsSort"
    var getCompanyOrder = "${mBaseUrl}/pc/getCompanyOrder"

    /*图标*/
    var LOGO_URL_BLUE = "http://img.jzxnm.com/uploads/APP/jizhi_logo_blue.png"
    var LOGO_URL_WHITE = "http://img.jzxnm.com/uploads/APP/jizhi_logo_white.png"
    var LOGO_URL_APP = "http://img.jzxnm.com/uploads/APP/app_logo.png"


/* ======================== 以下是旧版  =======================   */

    var base = "http://192.168.1.116:8084/qihua/base"
    var getSMS = "${DataApi.mApiUrl}getSMS"
    var forgetPwd = "${DataApi.mApiUrl}forgetPwd"
    var heartBeat = "${DataApi.mApiUrl}heartBeat"
    var updateData = "${DataApi.mApiUrl}updateData"
    var onPay = "${DataApi.mApiUrl}onPay"
    var orderResult = "${DataApi.mApiUrl}orderResult"

    //这个接口看看能否用上面同一个。
    var integralResult = "${DataApi.mApiUrl}integralResult"
    var uploadBatchOrderList = "${DataApi.mApiUrl}uploadBatchOrderList"


    fun iniUrls() {
//        login = "${DataApi.mApiUrl}login"
//        getSMS = "${DataApi.mApiUrl}getSMS"
//        forgetPwd = "${DataApi.mApiUrl}forgetPwd"
//        heartBeat = "${DataApi.mApiUrl}heartBeat"
//        updateData = "${DataApi.mApiUrl}updateData"
//        onPay = "${DataApi.mApiUrl}onPay"
//        orderResult = "${DataApi.mApiUrl}orderResult"
//        integralResult = "${DataApi.mApiUrl}integralResult"
//        uploadBatchOrderList = "${DataApi.mApiUrl}uploadBatchOrderList"

    }
}
